<?php namespace App\Infra;

use App\Utils\ModelOperatorTrait;
use App\Models\Welfare;
class WelfareManager{
	use ModelOperatorTrait;

	public function getWelfares($conditions = null,$first = false,$union = []){
		return $this->findModel(Welfare::class,Welfare::query()->with($union),$conditions,$first);
	}

	public function updateWelfare($conditions = null,$data = null){
		$this->update(Welfare::class,Welfare::query(),$conditions,$data);
	}

	public function createWelfare($data){
		$this->create(Welfare::class,$data);
	}

	public function deleteWelfare($conditions = null){
		$this->delete(Welfare::class,Welfare::query(),$conditions);
	}
}